home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / perl / 5.10.0 / Pod / Simple / TranscodeDumb.pm < prev    next >
Encoding:
Text File  |  2009-06-26  |  1.2 KB  |  64 lines

  1.  
  2. require 5;
  3. ## This module is to be use()'d only by Pod::Simple::Transcode
  4.  
  5. package Pod::Simple::TranscodeDumb;
  6. use strict;
  7. use vars qw($VERSION %Supported);
  8. $VERSION = '2.02';
  9. # This module basically pretends it knows how to transcode, except
  10. #  only for null-transcodings!  We use this when Encode isn't
  11. #  available.
  12.  
  13. %Supported = (
  14.   'ascii'       => 1,
  15.   'ascii-ctrl'  => 1,
  16.   'iso-8859-1'  => 1,
  17.   'null'        => 1,
  18.   'latin1'      => 1,
  19.   'latin-1'     => 1,
  20.   %Supported,
  21. );
  22.  
  23. sub is_dumb  {1}
  24. sub is_smart {0}
  25.  
  26. sub all_encodings {
  27.   return sort keys %Supported;
  28. }
  29.  
  30. sub encoding_is_available {
  31.   return exists $Supported{lc $_[1]};
  32. }
  33.  
  34. sub encmodver {
  35.   return __PACKAGE__ . " v" .($VERSION || '?');
  36. }
  37.  
  38. sub make_transcoder {
  39.   my($e) = $_[1];
  40.   die "WHAT ENCODING!?!?" unless $e;
  41.   my $x;
  42.   return sub {;
  43.     #foreach $x (@_) {
  44.     #  if(Pod::Simple::ASCII and !Pod::Simple::UNICODE and $] > 5.005) {
  45.     #    # We're in horrible gimp territory, so we need to knock out
  46.     #    # all the highbit things
  47.     #    $x =
  48.     #      pack 'C*',
  49.     #      map {; ($_ < 128) ? $_ : 0x7e }
  50.     #      unpack "C*",
  51.     #      $x
  52.     #    ;
  53.     #  }
  54.     #}
  55.     #
  56.     #return;
  57.   };
  58. }
  59.  
  60.  
  61. 1;
  62.  
  63.  
  64.